package com.usian;

import com.usian.pojo.TbItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "usian-cart-service")
public interface CartFeign {

    @RequestMapping("getCartFromRedis")
    Map<String, TbItem> getCartFromRedis(@RequestParam String userId);

    @RequestMapping("addCartToRedis")
    void addCartToRedis(@RequestBody Map<String, TbItem> cart, @RequestParam String userId);
}
